export default [
  // user
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', component: './User/Login' }
    ],
  },
  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    authority: ['1', '2'],
    routes: [
      // dashboard
      { path: '/', redirect: '/ad/list' },
      {
        path: '/ad',
        icon: 'table',
        name: 'ad',
        routes: [
          {
            path: '/ad/list',
            name: 'list',
            component: './Ad/List',
          },
          {
            path: '/ad/detail',
            name: 'detail',
            component: './Ad/Detail',
            hideInMenu: true
          }
        ]
      },
      {
        path: '/task',
        icon: 'table',
        name: 'task',
        routes: [
          {
            path: '/task/list',
            name: 'list',
            component: './Task/List',
          }
        ]
      },
      {
        name: 'exception',
        icon: 'warning',
        path: '/exception',
        hideInMenu: true,
        routes: [
          // exception
          {
            path: '/exception/403',
            name: 'not-permission',
            component: './Exception/403',
          },
          {
            path: '/exception/404',
            name: 'not-find',
            component: './Exception/404',
          },
          {
            path: '/exception/500',
            name: 'server-error',
            component: './Exception/500',
          },
          {
            path: '/exception/trigger',
            name: 'trigger',
            hideInMenu: true,
            component: './Exception/TriggerException',
          },
        ],
      },
      {
        name: 'account',
        icon: 'user',
        path: '/account',
        routes: [
          {
            path: '/account/center',
            name: 'center',
            component: './Account/Center/Center'
          }
        ],
      },
      {
        component: '404',
      },
    ],
  },
];
